<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>
      <?php echo $title; ?> - <?php echo C('STIE_NAME'); ?>
    </title>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_24081_lyaxcfn8fp1iqkt9.css">
    <link rel="stylesheet" href="/P201704/bbs/Public/layui/css/layui.css">
    <link rel="stylesheet" href="/P201704/bbs/Public/css/global.css"
    charset="utf-8">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="/P201704/bbs/Public/layui/layui.js">
    </script>
  </head>
  
  <body>
    <div class="fly-header layui-bg-black">
      <div class="layui-container">
        <a class="fly-logo" href="/P201704/bbs">
          <img src="//res.layui.com/images/fly/logo.png" alt="layui">
        </a>
        <ul class="layui-nav fly-nav layui-hide-xs">
          <li class="layui-nav-item">
            <a href="/">
              <i class="iconfont icon-jiaoliu">
              </i>
              交流
            </a>
          </li>
          <li class="layui-nav-item">
            <a href="/case/2017/">
              <i class="iconfont icon-iconmingxinganli">
              </i>
              案例
            </a>
          </li>
          <li class="layui-nav-item">
            <a href="http://www.layui.com/">
              <i class="iconfont icon-ui">
              </i>
              框架
            </a>
          </li>
        </ul>

        <?php if(!isset($_SESSION['uid'])){ ?>

        
        <ul class="layui-nav fly-nav-user">
          <li class="layui-nav-item">
            <a class="iconfont icon-touxiang layui-hide-xs" href="/user/login/">
            </a>
          </li>
          <li class="layui-nav-item">
            <a href="./xbslogin.html">
              登入
            </a>
          </li>
          <li class="layui-nav-item">
            <a href="<?php echo U('home/reg/index');?>">
              注册
            </a>
          </li>
          <li class="layui-nav-item layui-hide-xs">
            <a href="<?php echo U('home/login/qqlogin');?>" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})"
            title="QQ登入" class="iconfont icon-qq">
            </a>
          </li>
          <li class="layui-nav-item layui-hide-xs">
            <a href="/app/weibo/" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})"
            title="微博登入" class="iconfont icon-weibo">
            </a>
          </li>
        </ul>
        <?php }else{ ?>

        
        <ul class="layui-nav fly-nav-user">
          <li class="layui-nav-item" style="">
            <a class="fly-nav-avatar" href="javascript:;">
              <cite class="layui-hide-xs">
                <?php echo $_SESSION['nickname'] ?>
              </cite>
              <img src="/P201704/bbs/<?php echo $_SESSION['face'] ?>">
              <span class="layui-nav-more">
              </span>
            </a>
            <dl class="layui-nav-child layui-anim layui-anim-upbit">
              <dd>
                <a href="<?php echo U('home/set/index');?>">
                  <i class="layui-icon">
                    
                  </i>
                  基本设置
                </a>
              </dd>
              <dd>
                <a href="/user/message/">
                  <i class="iconfont icon-tongzhi" style="top: 4px;">
                  </i>
                  我的消息
                </a>
              </dd>
              <dd>
                <a href="/u/1962072">
                  <i class="layui-icon" style="font-size: 22px;">
                    
                  </i>
                  主页
                </a>
              </dd>
              <dd>
                <a href="<?php echo U('home/login/logout');?>">
                  <i class="iconfont icon-tuichu" style="top: 0; font-size: 21px;">
                  </i>
                  退出
                </a>
              </dd>
            </dl>
          </li>
          </span>
        </ul>

        <?php } ?>
      </div>
    </div>


    <div class="fly-panel fly-column">
  <div class="layui-container">
    <ul class="layui-clear">
      <li class="layui-hide-xs  layui-this">
        <a href="/P201704/bbs">
          首页
        </a>
      </li>
      <?php foreach ($cate as $row) { ?>
      <?php if($row['cname']!='温馨提示'){ ?>

        <li>
          <a href="<?php echo U('home/index/cate',array('cid'=>$row['cid']));?>">
            <?php echo $row['cname'] ?>
          </a>
        </li>

      <?php } ?>
      
      <?php } ?>
    </ul>
    <div class="fly-column-right layui-hide-xs">
      <span class="fly-search">
        <i class="layui-icon">
          
        </i>
      </span>
      <a href="<?php echo U('home/jie/add');?>" class="layui-btn">
        发表新帖
      </a>
    </div>
    <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
      <a href="<?php echo U('home/jie/add');?>" class="layui-btn">
        发表新帖
      </a>
    </div>
  </div>
</div>
<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md8">
      <?php if($topques){ ?>
      <div class="fly-panel">
        <div class="fly-panel-title fly-filter">
          <a>置顶</a>
          <a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin" style="color: #FF5722;">去签到</a></div>
        <ul class="fly-list">
          <?php foreach ($topques as $row) { ?>
            <li>
              <a href="/u/168" class="fly-avatar">
                <img src="/P201704/bbs/<?php echo $row['face'] ?>" alt="贤心"></a>
              <h2>
                <a class="layui-badge"><?php echo $row['cname'] ?></a>
                <a href="<?php echo U('home/jie/index',array('qid'=>$row['qid']));?>"><?php echo $row['title'] ?></a></h2>
              <div class="fly-list-info">
                <a href="/u/168" link="">
                  <cite><?php echo $row['nickname'] ?></cite>
                  <i class="iconfont icon-renzheng" title="认证信息：layui作者"></i>
                </a>
                <span><?php echo Ftime($row['ctime']) ?></span>
                <span class="fly-list-kiss" title="悬赏飞吻">
                  <i class="iconfont icon-kiss"></i><?php echo $row['kiss'] ?></span>
                <span class="layui-badge fly-badge-accept layui-hide-xs"><?php echo $row['status'] ?></span>
                <span class="fly-list-nums">
                  <i class="iconfont icon-pinglun1" title="回答"></i><?php echo $row['answer_num'] ?></span>
              </div>
              <div class="fly-list-badge"></div>
            </li>



          <?php } ?>
          </ul>
      </div>
      <?php } ?>
      <div class="fly-panel" style="margin-bottom: 0;">
        <div class="fly-panel-title fly-filter">
          <a href="/column/all/" class="layui-this">综合</a>
          <span class="fly-mid"></span>
          <a href="/column/all/unsolved/">未结</a>
          <span class="fly-mid"></span>
          <a href="/column/all/solved/">已结</a>
          <span class="fly-mid"></span>
          <a href="/column/all/wonderful/">精华</a></div>
        <ul class="fly-list">
          <?php foreach ($allques as $row) { ?>
            <li>
              <a href="/u/168" class="fly-avatar">
                <img src="/P201704/bbs/<?php echo $row['face'] ?>" alt="贤心"></a>
              <h2>
                <a class="layui-badge"><?php echo $row['cname'] ?></a>
                <a href="./j/<?php echo $row['qid']; ?>.html"><?php echo $row['title'] ?></a></h2>
              <div class="fly-list-info">
                <a href="/u/168" link="">
                  <cite><?php echo $row['nickname'] ?></cite>
                  <i class="iconfont icon-renzheng" title="认证信息：layui作者"></i>
                </a>
                <span><?php echo Ftime($row['ctime']) ?></span>
                <span class="fly-list-kiss" title="悬赏飞吻">
                  <i class="iconfont icon-kiss"></i><?php echo $row['kiss'] ?></span>
                <span class="layui-badge fly-badge-accept layui-hide-xs"><?php echo $row['status'] ?></span>
                <span class="fly-list-nums">
                  <i class="iconfont icon-pinglun1" title="回答"></i><?php echo $row['answer_num'] ?></span>
              </div>
              <div class="fly-list-badge"></div>
            </li>



          <?php } ?>
        </ul>
        <style type="text/css">
              .page{
                margin-top: 20px;
                height: 30px;
              }
             .page a,.page span{
                border: 1px solid #19A094;
                padding: 5px 10px;
                margin: 0 5px;
             } 
             .page .current{
              background: #19A094;
              color: #fff;
             }

        </style>
        <div class="page" style="text-align: center">
          <?php echo $show; ?>
        </div>
      </div>
    </div>
    
    <div class="layui-col-md4">

    <?php if($notice) { ?>

    
      <div class="fly-panel">
        <h3 class="fly-panel-title">温馨通道</h3>
        <ul class="fly-panel-main fly-list-static">

          <?php foreach ($notice as $row) { ?>
          
          <li>
            <a href="<?php echo U('home/jie/index',array('qid'=>$row['qid']));?>" target="_blank"><?php echo $row['title'] ?></a></li>

          <?php } ?>
          
        </ul>
      </div>

      <?php }?>
      <!-- <div class="fly-panel fly-signin">
        <div class="fly-panel-title">签到
          <i class="fly-mid"></i>
          <a href="javascript:;" class="fly-link" id="LAY_signinHelp">说明</a>
          <span class="fly-signin-days">已连续签到
            <cite>0</cite>天</span></div>
        <div class="fly-panel-main fly-signin-main">
          <button class="layui-btn layui-btn-danger" id="LAY_signin">今日签到</button>
          <span>可获得
            <cite>5</cite>飞吻</span></div>
      </div> -->
      <?php if($hotuser){ ?>

      
      <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank">
        <h3 class="fly-panel-title">回贴周榜</h3>
        <dl>
          <?php foreach ($hotuser as $row) { ?>
          <dd>
            <a href="/u/6845664">
              <img src="/P201704/bbs/<?php echo $row['face'] ?>">
              <cite><?php echo $row['nickname'] ?></cite>
              <i><?php echo $row['answer_num'] ?>次回答</i>
            </a>
          </dd>
          <?php } ?>
        </dl>
      </div>
      <?php } ?>
      <dl class="fly-panel fly-list-one">
        <dt class="fly-panel-title">本周热议</dt>
        <?php foreach ($hotques as $row) { ?>
          <dd>
            <a href="<?php echo U('home/jie/index',array('qid'=>$row['qid']));?>"><?php echo $row['title'] ?></a>
            <span>
              <i class="iconfont icon-pinglun1"></i><?php echo $row['answer_num'] ?></span>
          </dd>
        <?php } ?>
      </dl>
      <div class="fly-panel fly-link">
        <h3 class="fly-panel-title">友情链接</h3>
        <dl class="fly-panel-main">
          <dd>
            <a href="http://layim.layui.com/" target="_blank">WebIM</a></dd>
          <dd></dd>
          <dd>
            <a href="http://layer.layui.com/" target="_blank">layer</a></dd>
          <dd></dd>
          <dd>
            <a href="http://www.layui.com/laydate/" target="_blank">layDate</a></dd>
          <dd></dd>
          <dd>
            <a href="http://www.bejson.com/" target="_blank">JSON在线工具</a></dd>
          <dd></dd>
          <dd>
            <a href="http://www.smeoa.com/" target="_blank">小微OA</a></dd>
          <dd></dd>
          <dd>
            <a href="http://www.fineui.com/" target="_blank">FineUI开源控件</a></dd>
          <dd></dd>
          <dd>
            <a href="mailto:xianxin@layui.com?subject=%E7%94%B3%E8%AF%B7Fly%E7%A4%BE%E5%8C%BA%E5%8F%8B%E9%93%BE" class="fly-link">申请友链</a></dd>
          <dd></dd>
        </dl>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">

  layui.use('layer', function(){

    layer = layui.layer;

    $('.fly-search').click(function(event) {
        layer.open({
          type: 1,
          title: false,
          area: ['480px', '70px'],
          closeBtn: 0,
          shadeClose: true,
          skin: 'yourclass',
          content: '<form action="<?php echo U("home/search/so");?>" style="width:100%;height:100%;overflow: hidden;"><input autocomplete="off" placeholder="搜索内容，回车跳转" type="text" style="width:100%;height:100%" name="w"></form>'
        });
    });
  });

</script>
<style type="text/css">
  

  body{
    overflow: hidden;
  }
</style>


    <div class="fly-footer">
      <p>
        <a href="http://fly.layui.com/">
          Fly社区
        </a>
        2017 &copy;
        <a href="http://www.layui.com/">
          layui.com
        </a>
      </p>
      <p>
        <a href="http://fly.layui.com/jie/3147.html" target="_blank">
          产品授权
        </a>
        <a href="http://fly.layui.com/jie/8157.html" target="_blank">
          获取Fly社区模版
        </a>
        <a href="http://fly.layui.com/jie/2461.html" target="_blank">
          微信公众号
        </a>
      </p>
    </div>
  </body>

</html>
<script>
//注意：导航 依赖 element 模块，否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  
  //…
});
</script>